diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-10 18:17:40 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-11 02:24:44 +0100 |
| commit | 6315efacd6212a347877102a68f430fffa4ca4ac (patch) | |
| tree | b067fb4a1855f881b15e4e11ee161dda778150f9 /src/pages/article/[slug].tsx | |
| parent | cd1078e3a6ddb1b1598723beec4905c123ee85a6 (diff) | |
refactor(sidebar): use a component to avoid styles repetition
I also fix some overflow/sticky issues.
I have to set overflow auto only when there is no button-like
links otherwise, with translate, the button is cropped on hover.
Diffstat (limited to 'src/pages/article/[slug].tsx')
| -rw-r--r-- | src/pages/article/[slug].tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index 7d25843..fb79b41 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -18,6 +18,7 @@ import { ParsedUrlQuery } from 'querystring'; import { useEffect } from 'react'; import styles from '@styles/pages/Page.module.scss'; import { Sharing } from '@components/Widget'; +import Sidebar from '@components/Sidebar/Sidebar'; const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { const { @@ -67,9 +68,9 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { dangerouslySetInnerHTML={{ __html: content }} ></div> <PostFooter subjects={subjects} /> - <aside className={styles.aside}> + <Sidebar> <Sharing title={title} excerpt={intro} /> - </aside> + </Sidebar> <section className={styles.comments}> <CommentsList comments={comments} /> <CommentForm articleId={post.databaseId} /> |
